import type { RequestConfig } from './type';

export const Config: RequestConfig = {
  /** 请求超时时间 */
  timeout: 30000,
  /** 跳过全屏loading */
  skipLoading: false,
};

/** 全局配置注入逻辑 */
export const config = (map: RequestConfig) => {
  Object.entries(map).map(([key, val]) => {
    Config[key] = val;
  });
};

export default Config;
